So we have two things we want to address.
One, we don't have enough spawn locations and the zombies are stacking, so that's easy enough to fix.
Let's go to our workspace.
And I called them spawn locations and there's four of them.
They're invisible.
That's all right.
When we select them, we can see the outline.
Cool.
With the collisions off, I'm going to hit control D to duplicate those.
And I will spread these out maybe this way a little bit.
Maybe that way.
And then I'll do another one.
Control D duplicates more one.
Sue.
Let's see where they're all at.
So I'm going to select the top one and then shift click the bottom one.
There we go.
There's our spawn locations.
That should be pretty good.
This one in the rock will be fine.
Let's try it out.
Well, let's get a weapon, too, because we also want to clear the zombies to see when we hit zero,
we we're going to spawn new ones and not before.
So I'm going to show you how to make weapons later in the course.
But for now, let's go to our tool box.
And under models, I'm going to search for laser.
And these hyper lasers work pretty good.
You could search on hyper laser fast.
Hyper laser gun.
Let's just move that there.
It warns you that there's scripts.
I typically don't use things with scripts from the toolbox, but I will for testing.
I just I don't do it for my my production game.
There we go.
I just don't trust what's in other people's scripts.
All right.
So I got my hyper laser.
I'm going to drag it down to starter pack.
So it is in my backpack.
When we start the game, we're going to keep an eye on zombies.
When we get our ten, we'll kill them off.
And then when there's nothing in here, we should spawn new zombies.
But I think I'm going to put a print statement in my wave loop.
So go to your wave loop.
I'm going to print the number of zombies.
Right?
So I'm going to say.
Current number of zombies.
And that's going to be the count, right?
DT Just to make sure that that number makes sense.
And I'll go here to view output.
So we see the output window.
I'll make that a little bigger.
Let's go ahead and do a play.
Go to your game and then play here so we don't have to run all the way over there.
Now, remember, we have a five second delay.
Starting with current number of zombies is zero.
That'll change fast enough, right?
So we're not getting the stocking.
That's pretty good.
I mean, we could get some stocking, but we probably won't.
All right, We have ten zombies.
We shouldn't be getting any more.
Let's go ahead and kill some of these zombies.
Here we go.
We're down to seven.
Stop moving around.
There we go.
We got another one.
Got another two down to five.
All of you that I got three on one.
So we're down to one zombie.
Bam.
Starting wave.
Oh, here they come.
That's looking good.
It looks like we have some waves coming now, and we're controlling our numbers.